package org;

import android.app.Activity;
import android.content.ClipboardManager;
import android.content.ClipData;

public class ydClipBoardManager {
	static ClipboardManager mClipboard;

	public static void init(Activity a){
		mClipboard = (ClipboardManager)a.getSystemService(a.CLIPBOARD_SERVICE);
	}
	
	public static void insertIntoClipBoard(String s){
		ClipData clip = ClipData.newPlainText("label", s);
		mClipboard.setPrimaryClip(clip);
	}
	
	public static void clearClipBoard(){
		ClipData clip = ClipData.newPlainText("label", "");
		mClipboard.setPrimaryClip(clip);
	}
}
